/************************************************************
 * Project Name         [Thinking_In_Java]
 * File Name            [IUserBiz.java]
 * Creation Date        [23-Jul-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_principles.srp.example01;

/**
 * User Business Logic
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * 
 */
public interface IUserBiz {

	/**
	 * 添加用户
	 * 
	 * @param userBo
	 */
	public void addUser(IUserBO userBo);

	/**
	 * 删除用户
	 * 
	 * @param userId
	 * @return 是否删除成功
	 */
	public boolean deleteUser(String userId);

	/**
	 * 更新密码
	 * 
	 * @param oldPassword
	 * @param newPassword
	 * @param confirmedNewPassword
	 * @return 更新密码是否成功
	 */
	public boolean updatePassword(String oldPassword, String newPassword,
			String confirmedNewPassword);

	/**
	 * 根据UserID查找用户
	 * 
	 * @param userId
	 * @return 查找到的匹配用户
	 */
	public IUserBO searchUserById(String userId);

	/**
	 * 根据Username查找用户
	 * 
	 * @param username
	 * @return 查找到的匹配用户
	 */
	public IUserBO searchUserByName(String username);
}
